package ch15;

/**
 * Created by hp on 2016/4/23.
 */
public class ReplaceDemo {
    public static void main(String[] args) {
        String[] regexs = {".*foo",".*?foo",".*+foo"};
        for(String regex : regexs){
            System.out.println("xfooxxxxxxfoo".replace(regex,"Orz"));
        }
    }
}
